#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
京东配送回调SDK - Python版本
"""

from setuptools import setup, find_packages
import os

# 获取当前目录
here = os.path.abspath(os.path.dirname(__file__))

# 读取README文件
def read_file(filename):
    try:
        with open(os.path.join(here, filename), 'r', encoding='utf-8') as f:
            return f.read()
    except IOError:
        return ''

# 版本信息
version = '1.0.0'

# 长描述
long_description = read_file('README.md')

setup(
    name='jingdong-delivery-callback-sdk',
    version=version,
    description='京东配送回调SDK - Python版本',
    long_description=long_description,
    long_description_content_type='text/markdown',
    author='SDK Team',
    author_email='sdk@example.com',
    url='https://github.com/your-username/jingdong-delivery-callback-sdk',
    license='MIT',
    
    # 包信息
    packages=find_packages(),
    python_requires='>=3.6',
    
    # 依赖项
    install_requires=[
        'requests>=2.20.0',
        'redis>=3.0.0; extra == "redis"',
    ],
    
    # 可选依赖
    extras_require={
        'redis': ['redis>=3.0.0'],
        'dev': [
            'pytest>=6.0.0',
            'pytest-cov>=2.10.0',
            'black>=21.0.0',
            'flake8>=3.8.0',
            'mypy>=0.812',
        ],
    },
    
    # 分类信息
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
        'Programming Language :: Python :: 3.10',
        'Programming Language :: Python :: 3.11',
        'Topic :: Internet',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: System :: Networking',
    ],
    
    # 关键词
    keywords='jingdong delivery callback sdk logistics',
    
    # 项目URLs
    project_urls={
        'Documentation': 'https://github.com/your-username/jingdong-delivery-callback-sdk/tree/main/python',
        'Source': 'https://github.com/your-username/jingdong-delivery-callback-sdk',
        'Tracker': 'https://github.com/your-username/jingdong-delivery-callback-sdk/issues',
    },
    
    # 包含数据文件
    include_package_data=True,
    
    # 入口点
    entry_points={
        'console_scripts': [
            # 如果需要命令行工具可以在这里添加
        ],
    },
)
